package com.micro.ai.template.dto.request;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Pattern;
import lombok.Data;

import java.util.List;
import java.util.Map;

/**
 * 创建版本请求
 *
 * @author micro-ai
 * @since 0.0.1
 */
@Data
@Schema(description = "创建版本请求")
public class VersionCreateRequest {

    @NotBlank(message = "版本号不能为空")
    @Pattern(regexp = "^\\d+\\.\\d+\\.\\d+$", message = "版本号格式必须为 x.y.z")
    @Schema(description = "版本号", example = "1.0.0", requiredMode = Schema.RequiredMode.REQUIRED)
    private String version;

    @Schema(description = "版本描述", example = "初始版本")
    private String versionDescription;

    @NotBlank(message = "系统提示词不能为空")
    @Schema(description = "基础系统提示词", requiredMode = Schema.RequiredMode.REQUIRED)
    private String baseSystemPrompt;

    @NotBlank(message = "提示词模板不能为空")
    @Schema(description = "基础提示词模板", requiredMode = Schema.RequiredMode.REQUIRED)
    private String basePromptTemplate;

    @Schema(description = "输入Schema（JSON Schema格式）")
    private Map<String, Object> inputSchema;

    @Schema(description = "输出Schema（JSON Schema格式）")
    private Map<String, Object> outputSchema;

    @Schema(description = "配置Schema（JSON Schema格式）")
    private Map<String, Object> configSchema;

    @Schema(description = "默认参数")
    private Map<String, Object> defaultParameters;

    @Schema(description = "默认Ollama选项")
    private Map<String, Object> defaultOllamaOptions;

    @Schema(description = "能力列表", example = "[\"对话\", \"问答\", \"总结\"]")
    private List<String> capabilities;

    @Schema(description = "依赖项")
    private Map<String, Object> dependencies;

    @Schema(description = "元数据")
    private Map<String, Object> metadata;

    @Schema(description = "发布说明")
    private String releaseNotes;

    @Schema(description = "是否稳定版本", example = "true")
    private Boolean isStable;
}

